home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / games / nhak_src.zip / MAKEFILE.MSC < prev    next >
Text File  |  1993-03-16  |  10KB  |  323 lines

  1. #    SCCS Id: @(#)Makefile.msc    3.0    89/08/13
  2. #    PC NetHack 3.0 Makefile for Microsoft(tm) "C" 5.1 -- Paul Gyugyi
  3. #
  4. # Large memory model, register bug, remove stack probes:
  5. CC    = cl /c
  6. LINK    = link
  7. MODEL    = L
  8.  
  9. # Directories (makedefs hardcodes these, don't change them)
  10. INCL    = ..\include
  11. AUX    = ..\auxil
  12. SRC    = ..\src
  13.  
  14. # If you don't have a 286 or better, remove the /G2 in the line below.
  15. CFLAGS    = /A$(MODEL) /DLINT_ARGS /DDGK /Os /Oa /G2 /Gs /Gt28 /I$(INCL) /W0
  16. LFLAGS    = /noi /st:0x0aff /se:512
  17. TARG    = pc
  18.  
  19. .c.o:
  20.     $(CC) $(CFLAGS) /Foo\$*.o $*.c 
  21.  
  22. # Optional high-quality BSD random number generation routines (see pcconf.h).
  23. # Set to nothing if not used.
  24. # RANDOM = o\random.o
  25. RANDOM =
  26.  
  27. # For NDMAKE, to handle the .o suffix.
  28. .SUFFIXES: .exe .o .c .y .l
  29.  
  30. # The game name
  31. GAME= nethack
  32.  
  33. # The game directory
  34. GAMEDIR = \games\$(GAME)
  35.  
  36. # The game filename
  37. GAMEFILE = $(GAMEDIR)\$(GAME).exe
  38.  
  39. # object files for makedefs
  40. MAKEOBJS = o\makedefs.o o\monst.o o\objects.o
  41.  
  42. # object files for special levels compiler
  43. SPLEVOBJS = o\lev_comp.o o\lev_lex.o o\lev_main.o o\alloc.o o\monst.o o\objects.o o\panic.o
  44.  
  45. # nothing below this line should have to be changed
  46. #
  47. # other things that have to be reconfigured are in config.h,
  48. # {unixconf.h, pcconf.h, tosconf.h}, and possibly system.h
  49.  
  50. VOBJ =    o\allmain.o o\alloc.o o\apply.o o\artifact.o o\attrib.o o\bones.o \
  51.     o\cmd.o o\dbridge.o o\decl.o o\demon.o o\do.o o\do_name.o o\do_wear.o \
  52.     o\dog.o o\dogmove.o o\dokick.o o\dothrow.o o\eat.o o\end.o o\engrave.o \
  53.     o\exper.o o\extralev.o o\fountain.o o\getline.o o\hack.o o\invent.o \
  54.     o\lock.o o\mail.o o\main.o o\makemon.o o\mcastu.o o\mhitm.o o\mhitu.o \
  55.     o\mklev.o o\mkmaze.o o\mkobj.o o\mkroom.o o\mon.o o\mondata.o \
  56.     o\msdos.o o\monmove.o o\monst.o o\mthrowu.o o\music.o o\o_init.o \
  57.     o\objects.o o\objnam.o o\options.o o\pager.o o\pickup.o o\polyself.o \
  58.     o\potion.o o\pray.o o\pri.o o\priest.o o\prisym.o $(RANDOM) o\read.o \
  59.     o\restore.o o\rip.o o\rnd.o o\rumors.o o\save.o o\search.o o\shk.o \
  60.     o\shknam.o o\sit.o o\sounds.o o\sp_lev.o o\spell.o o\steal.o \
  61.     o\termcap.o o\timeout.o o\topl.o o\topten.o o\track.o o\trap.o \
  62.     o\tty.o o\u_init.o o\uhitm.o o\unix.o o\vault.o o\weapon.o o\were.o \
  63.     o\wield.o o\wizard.o o\worm.o o\worn.o o\write.o o\zap.o
  64. HOBJ =    $(VOBJ) o\version.o
  65.  
  66. PCCONF_H   = $(INCL)\$(TARG)conf.h $(INCL)\msdos.h $(INCL)\system.h \
  67.          $(INCL)\extern.h 
  68. GLOBAL_H   = $(INCL)\global.h $(INCL)\coord.h $(PCCONF_H)
  69. CONFIG_H   = $(INCL)\config.h $(INCL)\tradstdc.h $(GLOBAL_H)
  70. TRAP_H       = $(INCL)\trap.h
  71. PERMONST_H = $(INCL)\permonst.h $(INCL)\monattk.h $(INCL)\monflag.h
  72. YOU_H       = $(INCL)\you.h $(INCL)\attrib.h $(PERMONST_H) $(INCL)\mondata.h \
  73.          $(INCL)\monst.h $(INCL)\youprop.h $(INCL)\prop.h $(INCL)\pm.h
  74. DECL_H       = $(INCL)\decl.h $(INCL)\spell.h $(INCL)\obj.h $(YOU_H) \
  75.          $(INCL)\onames.h $(INCL)\color.h
  76. HACK_H       = $(CONFIG_H) $(DECL_H) $(INCL)\monsym.h $(INCL)\mkroom.h \
  77.          $(INCL)\objclass.h $(INCL)\gold.h $(INCL)\trap.h $(INCL)\flag.h \
  78.          $(INCL)\rm.h $(INCL)\hack.h
  79.  
  80. # The main target
  81. # NDMAKE automatically generates LINK response files
  82. $(GAMEDIR)\$(GAME).exe: $(HOBJ) ltermlib.lib
  83.     $(LINK) $(HOBJ),nethack,nethack,$(SRC)\ltermlib $(LFLAGS)
  84.  
  85.  
  86. $(GAME): $(GAMEDIR)\$(GAME).exe
  87. $(GAME).exe: $(GAMEDIR)\$(GAME).exe
  88.  
  89.  
  90. # make ltermlib.lib -- replaces makefile in termcap.arc
  91. # unarc termcap.arc into src directory, but be careful that the
  92. # makefile in the archive does not overwrite this one
  93. TL_LSOURCES =    tgetent.c tgetflag.c tgetnum.c tgetstr.c tgoto.c tputs.c \
  94.         isdigit.c fgetlr.c
  95.  
  96. TL_LOBJECTS =    o\tgetent.o o\tgetflag.o o\tgetnum.o o\tgetstr.o \
  97.                 o\tgoto.o o\tputs.o o\isdigit.o o\fgetlr.o
  98.  
  99. ltermlib.lib :    $(TL_LOBJECTS)
  100.         lib ltermlib.lib -+ $(TL_LOBJECTS);
  101.  
  102. .c.o:
  103.     $(CC) $(CFLAGS) /Fo.\o\$*.o $*.c
  104.  
  105. all:    o lev_comp.exe $(GAME) auxil.tag install.tag
  106.     @echo Done.
  107.  
  108. o:
  109.     if not exist .\o\*.* mkdir o
  110.  
  111. makedefs.exe:    $(MAKEOBJS)
  112.     $(LINK) $(LFLAGS) $(MAKEOBJS);
  113.  
  114. o\makedefs.o:  $(INCL)\config.h $(INCL)\permonst.h $(INCL)\objclass.h
  115.  
  116. lev_comp.exe:  $(SPLEVOBJS)
  117.     $(LINK) $(LFLAGS) $(SPLEVOBJS),lev_comp.exe;
  118.  
  119. o\lev_comp.o:  $(HACK_H) $(INCL)\sp_lev.h
  120. o\lev_lex.o:  $(INCL)\lev_comp.h $(HACK_H) $(INCL)\sp_lev.h
  121. o\lev_main.o:  $(HACK_H)
  122.  
  123. # If you have yacc or lex programs, and make any changes,
  124. # add some .y.c and .l.c rules to your Make.ini.
  125.  
  126. lev_comp.c:  lev_comp.y
  127. lev_lex.c:  lev_comp.l
  128.  
  129. #
  130. #    The following include files depend on makedefs to be created.
  131. #
  132. #    date.h should be remade any time any of the source or include code
  133. #    is modified.
  134. #
  135. $(INCL)\date.h:     $(VOBJ) makedefs.exe
  136.     .\makedefs -v
  137.  
  138. $(INCL)\trap.h:     makedefs.exe
  139.     .\makedefs -t
  140.  
  141. $(INCL)\onames.h:  makedefs.exe
  142.     .\makedefs -o
  143.  
  144. $(INCL)\pm.h:  makedefs.exe
  145.     .\makedefs -p
  146.  
  147. data:    $(AUX)\data.base makedefs.exe
  148.     .\makedefs -d
  149.  
  150. rumors: $(AUX)\rumors.tru $(AUX)\rumors.fal makedefs.exe
  151.     .\makedefs -r
  152.  
  153. #
  154. #    The following programs vary depending on what OS you are using.
  155. #
  156. o\main.o:   $(HACK_H) $(TARG)main.c
  157.     $(CC) $(CFLAGS)  /Fo.\o\main.o $(TARG)main.c
  158.  
  159. o\tty.o:   $(HACK_H) $(INCL)\func_tab.h $(TARG)tty.c
  160.     $(CC) $(CFLAGS)  /Fo.\o\tty.o $(TARG)tty.c
  161.  
  162. o\unix.o:   $(HACK_H) $(TARG)unix.c
  163.     $(CC) $(CFLAGS)  /Fo.\o\unix.o $(TARG)unix.c
  164.  
  165. #
  166. # Secondary targets
  167. #
  168.  
  169. auxil.tag:    spec_levs.tag data rumors termcap
  170. # the tag file is a dummy file to keep from redoing this every make
  171.         echo special levels created > auxil.tag
  172.  
  173. install.tag:
  174. # always done
  175. # assume \games exists already, but make it just to make sure
  176.         md \games
  177.         md $(GAMEDIR)
  178.         md $(GAMEDIR)\bones
  179.         echo y>yes.txt
  180. #
  181. #       Watch Out!  The next command cleans out the game & bones dirs!
  182. #       This will delete any config file you have and overwrite it
  183. #       with the default.
  184. #       Since the game options may have changed since your last install, 
  185. #       you should say yes to clean the directory.
  186. #
  187.         del $(GAMEDIR)\*.* < yes.txt
  188.         del $(GAMEDIR)\bones\*.* < yes.txt
  189.         copy termcap     $(GAMEDIR)\termcap
  190.         copy castle      $(GAMEDIR)
  191.     copy endgame     $(GAMEDIR)
  192.     copy tower?      $(GAMEDIR)
  193.         copy $(GAME).exe $(GAMEDIR)
  194.     copy $(AUX)\*.   $(GAMEDIR)
  195.         copy nethack.cnf $(GAMEDIR)
  196.         echo record >    $(GAMEDIR)\record
  197.         echo install done >install.tag
  198.  
  199.  
  200. spec_levs.tag: lev_comp.exe $(AUX)\castle.des $(AUX)\endgame.des $(AUX)\tower.des
  201.     lev_comp $(AUX)\castle.des
  202.     lev_comp $(AUX)\endgame.des
  203.     lev_comp $(AUX)\tower.des
  204.         echo spec_lev done >spec_levs.tag
  205.  
  206. clean:
  207.     del o\*.o
  208.     rmdir o
  209.  
  210. spotless: clean
  211.     cd $(INCL)
  212.     del date.h
  213.     del onames.h
  214.     del pm.h
  215.     cd $(SRC)
  216.     del makedefs.exe
  217.     del lev_comp.exe
  218.         del $(AUX)\data
  219.         del $(AUX)\rumors
  220.         del castle
  221.         del endgame
  222.         del tower?
  223.         del *.tag
  224.         del $(GAME).exe
  225.         del $(GAME).map
  226.  
  227. #
  228. # Other dependencies
  229. #
  230.  
  231. # GO AHEAD, DELETE THIS LINE
  232.  
  233. o\allmain.o:  $(HACK_H)
  234. o\alloc.o:  $(CONFIG_H)
  235. o\apply.o:  $(HACK_H) $(INCL)\edog.h
  236. o\artifact.o:  $(HACK_H) $(INCL)\artifact.h
  237. o\attrib.o:  $(HACK_H)
  238. o\bones.o:  $(HACK_H)
  239. o\cmd.o:  $(HACK_H) $(INCL)\func_tab.h
  240. o\dbridge.o: $(HACK_H)
  241. o\decl.o:  $(HACK_H)
  242. o\demon.o:  $(HACK_H)
  243. o\do.o:  $(HACK_H)
  244. o\do_name.o:  $(HACK_H)
  245. o\do_wear.o:  $(HACK_H)
  246. o\dog.o:  $(HACK_H) $(INCL)\edog.h
  247. o\dogmove.o:  $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h
  248. o\dokick.o:  $(HACK_H) $(INCL)\eshk.h
  249. o\dothrow.o:  $(HACK_H)
  250. o\eat.o:  $(HACK_H)
  251. o\end.o:  $(HACK_H) $(INCL)\eshk.h
  252. o\engrave.o:  $(HACK_H)
  253. o\exper.o:  $(HACK_H)
  254. o\extralev.o:  $(HACK_H)
  255. o\fountain.o:  $(HACK_H)
  256. o\getline.o:  $(HACK_H) $(INCL)\func_tab.h
  257. o\hack.o:  $(HACK_H)
  258. o\invent.o:  $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  259. o\ioctl.o:  $(HACK_H)
  260. o\lock.o:  $(HACK_H)
  261. o\makemon.o:  $(HACK_H)
  262. o\mail.o:  $(HACK_H)
  263. o\mcastu.o:  $(HACK_H)
  264. o\mhitm.o:  $(HACK_H) $(INCL)\artifact.h
  265. o\mhitu.o:  $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h
  266. o\mklev.o:  $(HACK_H)
  267. o\mkmaze.o:  $(HACK_H)
  268. o\mkobj.o:  $(HACK_H)
  269. o\mkroom.o:  $(HACK_H)
  270. o\mon.o:  $(HACK_H) $(INCL)\mfndpos.h $(INCL)\wseg.h
  271. o\mondata.o:  $(HACK_H) $(INCL)\eshk.h $(INCL)\epri.h
  272. o\monmove.o:  $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h
  273. o\monst.o:  $(CONFIG_H) $(PERMONST_H) $(INCL)\monsym.h $(INCL)\eshk.h $(INCL)\vault.h $(INCL)\epri.h $(INCL)\color.h
  274. o\msdos.o:  $(HACK_H)
  275. o\mthrowu.o:  $(HACK_H)
  276. o\music.o:  $(HACK_H)
  277. o\o_init.o:  $(HACK_H)
  278. o\objects.o:  $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h $(INCL)\prop.h $(INCL)\color.h
  279. o\objnam.o:  $(HACK_H)
  280. o\options.o:  $(HACK_H)
  281. o\pager.o:  $(HACK_H)
  282. o\panic.o:  $(CONFIG_H)
  283. o\pickup.o:  $(HACK_H)
  284. o\polyself.o:  $(HACK_H)
  285. o\potion.o:  $(HACK_H)
  286. o\pray.o:  $(HACK_H)
  287. o\pri.o:  $(HACK_H) $(INCL)\epri.h $(INCL)\termcap.h
  288. o\priest.o:  $(HACK_H) $(INCL)\mfndpos.h $(INCL)\eshk.h $(INCL)\epri.h
  289. o\prisym.o:  $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  290. o\random.o:
  291. o\read.o:  $(HACK_H)
  292. o\restore.o:  $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  293. o\rip.o:  $(HACK_H)
  294. o\rnd.o:  $(HACK_H)
  295. o\rumors.o:  $(HACK_H)
  296. o\save.o:  $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  297. o\search.o:  $(HACK_H) $(INCL)\artifact.h
  298. o\shk.o:  $(HACK_H) $(INCL)\eshk.h
  299. o\shknam.o:  $(HACK_H) $(INCL)\eshk.h
  300. o\sit.o:  $(HACK_H)
  301. o\sounds.o:  $(HACK_H) $(INCL)\edog.h $(INCL)\eshk.h
  302. o\sp_lev.o:  $(HACK_H) $(INCL)\sp_lev.h
  303. o\spell.o:  $(HACK_H)
  304. o\steal.o:  $(HACK_H)
  305. o\termcap.o:  $(HACK_H) $(INCL)\termcap.h
  306. o\timeout.o:  $(HACK_H)
  307. o\topl.o:  $(HACK_H)
  308. o\topten.o:  $(HACK_H)
  309. o\track.o:  $(HACK_H)
  310. o\trap.o:  $(HACK_H) $(INCL)\edog.h
  311. o\u_init.o:  $(HACK_H)
  312. o\uhitm.o:  $(HACK_H) $(INCL)\artifact.h
  313. o\vault.o:  $(HACK_H) $(INCL)\vault.h
  314. o\version.o:  $(HACK_H) $(INCL)\date.h $(INCL)\patchlev.h
  315. o\weapon.o:  $(HACK_H)
  316. o\were.o:  $(HACK_H)
  317. o\wield.o:  $(HACK_H)
  318. o\wizard.o:  $(HACK_H)
  319. o\worm.o:  $(HACK_H) $(INCL)\wseg.h
  320. o\worn.o:  $(HACK_H)
  321. o\write.o:  $(HACK_H)
  322. o\zap.o:  $(HACK_H)
  323.